<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
</head>
<body ng-app="myApp">
	<li class="box" my-btn ><!--如果在模板中添加了replace属性,这里的li标签就会被替换掉-->

	</li>
	<script id="tmp" type="text/ng-template">
	<ul>
		<li>这是通过templateUrl添加的模板 ,这里添加了replace属性,直接会覆盖掉包含它的容器</li>
	</ul>
	</script>
	<script src="angular.js"></script>
	<script>
		var app =angular.module("myApp",[]);
		app.directive("myBtn",[function(){
			return {
				templateUrl:'tmp',
				replace:true,
			}
		}]);
	</script>
</body>
</html>
